package be.vandaag.model.utils
{
	import flash.external.ExternalInterface;
	
	public class Tracr
	{
		public static function print(text:*):void
		{
			ExternalInterface.call( "console.log" , ">> Tracr print :: "+text+ " <<");
			trace(">> TRACR print :: "+text+ " <<");
		}
		
		public static function printArray(arr:Array):void
		{
			var output:String = ">> Tracr print ARRAY <<\n";
			
			if(arr != null)
			{
				for(var i:uint = 0; i<arr.length; i++)
				{
					output += arr[i]+"\n";
				}
			}
				
			else
			{
				output = "[Array is empty]\n";
			}
			
			output += ">> Tracr END <<";
			
			ExternalInterface.call( "console.log" , output);
			trace(output);
		}
	}
}